<?php

/**
 * config.php - configuration file for Frameworky installation
 *
 * Note: The global key is processed for all requests unless a matching property
 * is found under another key (i.e. any property belonging to another config key
 * with a matching hostname will take precedence over any property declared
 * under the global key).
 */

$GLOBALS['CONFIG'] = array(
	'global' => array(
		'enabled' => true,
		'debug' => true,
		'host_dir' => 'local.frameworky.com',
		'hosts' => array(
			'local.frameworky.com',
			'localhost',
			'frameworky'
		),
		'compress_js' => false,
		'compress_css' => false,
		'compress_html' => false,
		'compress_jpeg' => false,
		'jpeg_quality' => 100,
		'databases' => array(
			'default' => array(
				'type' => 'mysql',
				'host' => 'localhost',
				'name' => 'frameworky',
				'user' => 'root',
				'pass' => ''
			)
		),
		'cache_enabled' => false,
		'cache_rules' => array(),
		'rewrite_enabled' => false,
		'rewrite_rules' => array()
	),
	'production' => array(
		'debug' => true,
		'hosts' => array(
			'local.frameworky.com',
			'frameworky.com',
			'www.frameworky.com'
		),
		'compress_js' => true,
		'compress_css' => true,
		'compress_html' => true,
		'compress_jpeg' => true,
		'jpeg_quality' => 80,
		'databases' => array(
			'default' => array(
				'type' => 'mysql',
				'host' => 'localhost',
				'name' => 'tobiusho_frameworky',
				'user' => 'tobiusho_frameworky',
				'pass' => '!fr4m3w0rkymy5ql!'
			)
		),
		'cache_enabled' => true,
		'cache_rules' => array(
			array(
				'match' => '/^.*\.jpg$/',
				'ttl' => 60
			),
			array(
				'match' => '/^.*\.png$/',
				'ttl' => (60 * 60 * 24 * 7)
			),
			array(
				'match' => '/^\/temp\/.*$/',
				'ttl' => 60
			)
		),
		'rewrite_enabled' => true,
		'rewrite_rules' => array(
			array(
				'match' => '/^\/proxy\/(.*)$/',
				'replace' => '/proxy.php?request_url=$1',
				'redirect' => false
			),
			array(
				'match' => '/^\/img\/products\/(.*).jpg$/',
				'replace' => '/img/products/smcimage.jpg?productid=$1',
				'redirect' => false
			),
			array(
				'match' => '/^\/logo2\.png$/',
				'replace' => '/money.png',
				'redirect' => true
			),
			array(
				'match' => '/logo/',
				'replace' => 'momo',
				'redirect' => false
			)
		)
	)
);

?>
